//============================================================================
// Name        : t_types.cpp
// Author      : inkooboo
// Version     :
// Copyright   :
// Description : main in C++
//============================================================================

#include "core/types.hpp"

#include <boost/timer.hpp>

#include <iostream>
#include <vector>

using namespace std;

static const int number = 10000000;

int main(void) {

  vector3_t def;
  cout << "default constructor of vector3_t: " << def.x << " " << def.y << " " << def.z << endl;

  vector3_t empty = vector3_t::empty();
  cout << "empty creation factory of vector3_t: " << empty.x << " " << empty.y << " " << empty.z << endl;

  vector<vector3_t> vect_stl;

  cout << "creating of " << number << " uninitialized vector3_t in stl container ...";
  boost::timer timer;
  vect_stl.resize(number);
  cout << timer.elapsed() << " sec" << endl;
  vect_stl.resize(0);

  cout << "creating of " << number << " initialized vector3_t in stl container ...";
  timer.restart();
  vect_stl.resize(number, vector3_t::empty());
  cout << timer.elapsed() << " sec" << endl;
  vect_stl.resize(0);

  return 0;
}
